import request from '@/utils/request'
export function fetchList(query) {
  return request({
    url: '/vue-element-admin/user/list',
    method: 'get',
    params: query
  })
}
export function userDetail(query) {
  return request({
    url: '/vue-element-admin/user_detail',
    method: 'get',
    params: query
  })
}
export function userCourse(query) {
  return request({
    url: '/vue-element-admin/user_course',
    method: 'get',
    params: query
  })
}
export function userColumn(query) {
  return request({
    url: '/vue-element-admin/user_column',
    method: 'get',
    params: query
  })
}
export function userOrder(query) {
  return request({
    url: '/vue-element-admin/user_order',
    method: 'get',
    params: query
  })
}
export function userHistory(query) {
  return request({
    url: '/vue-element-admin/user_history',
    method: 'get',
    params: query
  })
}
export function userComment(query) {
  return request({
    url: '/vue-element-admin/user_comment',
    method: 'get',
    params: query
  })
}
export function userNoComment(query) {
  return request({
    url: '/vue-element-admin/user_nocomment',
    method: 'get',
    params: query
  })
}
export function userNoAccess(query) {
  return request({
    url: '/vue-element-admin/user_noaccess',
    method: 'get',
    params: query
  })
}
export function login(data) {
  return request({
    url: '/vue-element-admin/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
